define(['jquery'], function ($) {
    new right().init();
});
var right = function () {
    var target = this;
      this.init = function () {
          $('#header-search').click(function () {
              target.search();
          });
          $('#search').bind('keypress', function (event) {
              if (event.keyCode == "13") {
                  target.search();
              }
          });
      }
      this.search = function () {
              var search = $('#search');
              if ($(search).val() == "" || $(search).val() == " ") {
                  return false;
              } else {
                  window.location.href='/search.html?q=' + encodeURIComponent($(search).val());
              }
      }
}